home *** CD-ROM | disk | FTP | other *** search
/ Super PC 34 / Super PC 34 (Shareware).iso / spc / UTIL / DJGPP2 / V2 / DJLSR200.ZIP / src / libc / posix / unistd / setuid.c < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-02  |  209 b   |  13 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #include <unistd.h>
  3. #include <errno.h>
  4.  
  5. int
  6. setuid(uid_t uid)
  7. {
  8.   if (uid == getuid())
  9.     return 0;
  10.   errno = EPERM;
  11.   return -1;
  12. }
  13.